//
//  LAGImageConvertViewController.m
//  LAMapBasicDemo
//
//  Created by 罗亮富 on 2018/2/3.
//  Copyright © 2018年 2Bulu. All rights reserved.
//

#import "LAGImageConvertViewController.h"
#import "LAGOverLapImageScrollView.h"
#import "LAGOperControlPannelView.h"
#import <UIKitUtli/UIKitUtli.h>

@interface LAGImageConvertViewController ()

@property (nonatomic, strong) LAGOverLapImageScrollView *imageScaleView;
@property (nonatomic, strong) LAGOperControlPannelView *operationPannel;
@end

@implementation LAGImageConvertViewController
{

}


- (void)viewDidLoad
{
    [super viewDidLoad];
    
    UIImage *iamge = [UIImage imageNamed:@"map_han.jpg"];//[UIImage imageNamed:@"map_han.jpg"];
    self.imageScaleView = [[LAGOverLapImageScrollView alloc]initWithFrame:CGRectZero];
    [self.imageScaleView displayImage:iamge];
    [self.imageScaleView setOverlappedMapView:self.mapView];
    [self.view addSubview:self.imageScaleView];
    
    self.operationPannel = [[LAGOperControlPannelView alloc]initWithAlpaValue:self.imageScaleView.contentAlpha withReacteMode:LAGreactImageMode];
    [self.view addSubview:self.operationPannel];
    self.imageScaleView.controlPannel = self.operationPannel;
    
    
}

-(void)viewDidLayoutSubviews
{
    [super viewDidLayoutSubviews];
    
    
    CGFloat h = 110;
    self.operationPannel.frame = CGRectMake(0, self.view.bottom-h, self.view.width, h);
    CGFloat y = 110;
    self.imageScaleView.frame = CGRectMake(0, y, self.view.width, self.operationPannel.top-y);
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}





@end
